package com.plugin.core.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * 预订记录实体类
 * 
 * @author mark
 * @date 2025-07-23
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("elder_reservation")
@Schema(name = "ElderReservation", description = "预订记录表")
public class ElderReservation {

    @Schema(description = "预订ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @Schema(description = "长者ID")
    @TableField("elder_id")
    private Long elderId;

    @Schema(description = "联系人姓名")
    @TableField("contact_name")
    private String contactName;

    @Schema(description = "联系电话")
    @TableField("contact_phone")
    private String contactPhone;

    @Schema(description = "房间ID")
    @TableField("room_id")
    private Integer roomId;


    @Schema(description = "预计入住日期")
    @TableField("expected_check_in_date")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime expectedCheckInDate;

    @Schema(description = "预订日期")
    @TableField("reservation_date")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime reservationDate;

    @Schema(description = "押金")
    @TableField("deposit")
    private BigDecimal deposit;

    @Schema(description = "状态：0-已取消，1-已预订，2-已转入住")
    @TableField("status")
    private Integer status;

    @Schema(description = "备注")
    @TableField("remark")
    private String remark;

    @Schema(description = "创建时间")
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "更新时间")
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @Schema(description = "创建人")
    @TableField("create_by")
    private String createBy;

    @Schema(description = "更新人")
    @TableField("update_by")
    private String updateBy;

    @Schema(description = "是否删除：0-未删除，1-已删除")
    @TableField("del")
    private Integer del;
}
